import request from '@/utils/request'

export const CarParkApi = {
    /**
     *  城市列表
     * @returns
     */
    getPage: (data) => {
        return request({
            url: '/manage/intercity/carPark/getPage',
            data,
            method: 'post'
        })
    },

    /**
     *  城市列表
     * @returns
     */
    getList: (stationId) => {
        return request({
            url: '/manage/intercity/carPark/getList',
            params:{stationId},
            method: 'get'
        })
    },

    /**
     *  更新排序
     * @returns
     */
    updateSort: (data) => {
        return request({
            url: '/manage/intercity/carPark/updateSort',
            data,
            method: 'post'
        })
    },

    /**
     *  更新状态
     * @returns
     */
    updateStatus: (data) => {
        return request({
            url: '/manage/intercity/carPark/updateStatus',
            data,
            method: 'post'
        })
    },

    /**
     *  删除
     * @returns
     */
    delete: (carParkId) => {
        return request({
            url: '/manage/intercity/carPark/delete',
            params:{carParkId},
            method: 'get'
        })
    },

    /**
     *  获取详细信息
     * @returns
     */
    getInfoById: (carParkId) => {
        return request({
            url: '/manage/intercity/carPark/getInfoById',
            params:{carParkId},
            method: 'get'
        })
    },

    /**
     *  更新
     * @returns
     */
    update: (data) => {
        return request({
            url: '/manage/intercity/carPark/update',
            data,
            method: 'post'
        })
    },

    /**
     *  插入
     * @returns
     */
    insert: (data) => {
        return request({
            url: '/manage/intercity/carPark/insert',
            data,
            method: 'post'
        })
    }
}
